
public class Action {
	/**
	 * RAISE= raise to a value, not the amount raised by.  If this fails, you fold.
	 * CALL= call the current value, (even if it's 0).  If this fails, you fold
	 * FOLD= self explanatory
	 * @author Alex
	 */
	public static enum ActionType {FOLD, RAISE, CALL}
	public ActionType type;
	public int value;

	public static Action foldAction()
	{
		return new Action(ActionType.FOLD);
	}

	public static Action raiseAction(int v)
	{
		return new Action(ActionType.RAISE, v);
	}

	public static Action callAction()
	{
		return new Action(ActionType.CALL);
	}

	public Action (ActionType at)
	{
		type = at;
		value = 0;
	}

	public Action (ActionType at, int v)
	{
		type = at;
		value = v;
	}

	public String toString()
	{
		String output = "";
		switch (type)
		{
		case CALL:
			output+= "calls";
			break;

		case RAISE:
			output += "raises to "+value;
			break;

		case FOLD:
			output += "folds";
			break;
		}

		return output;
	}
}
